<%@page  import="merlin.beans.*,merlin.dao.*,merlin.managers.*,merlin.servlets.*,merlin.utils.*" %>
<HTML>
<HEAD>
    <TITLE></TITLE>
	<meta HTTP-EQUIV="Cache-Control"  CONTENT="no-cache" />
	<meta HTTP-EQUIV="Expires"        CONTENT="1 Jan 1980" />
	<meta HTTP-EQUIV="MaxAge"         CONTENT="0" />
	<meta HTTP-EQUIV="Pragma-Control" CONTENT="no-cache" />
</HEAD>
<BODY>
<script>
	function addToSelCompanies(){
		m2len = m2.length;
	    var aOption = document.createElement("OPTION");
    	aOption.text = document.frmCompanies.lstCompanies.options[document.frmCompanies.lstCompanies.selectedIndex].text;
	    aOption.value = document.frmCompanies.lstCompanies.options[document.frmCompanies.lstCompanies.selectedIndex].value;
	}

<%
	String mode = (String)request.getParameter("mode");
	if(mode != null){
		// find what kind of search was done.
		if(mode.equals("searchCompaniesByKeyword")){
			// it was a search by keyword.
			DbResultSet result = (DbResultSet)request.getAttribute("result");
			out.println("alert('Found " + result.size() + " records')");
%>

<%
		}
	}
%>
</script>
	<form action="merlin" name="frmSearch" method="post">
		<input type="hidden" name="mode">
		<input type="hidden" name="hidSearch">
		<input type="hidden" name="hidCompanies">
		<input type="hidden" name="hidSearchType">
	</form>
</BODY>
</HTML>